﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Practices.EnterpriseLibrary.Common;
using Microsoft.Practices.EnterpriseLibrary.Data;
using System.Data.Common;
using System.Data;

namespace MINERP.DAL.DisJoin
{
    //统计产品中的照片在大板上的有效面积
    public class OrderInfoStatDAL
    {
        public static void StatPhotoEffectArea(List<int> orderProductIdLlist)
        {

            Database db = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetStoredProcCommand("statBoardEffectArea");
            foreach (int OrderProductId in orderProductIdLlist)
            {

                if (dbCommand.Parameters.Count>0)
                {
                    dbCommand.Parameters.Clear();
                }

                db.AddInParameter(dbCommand, "orderProductId", DbType.Int32, OrderProductId);
                db.ExecuteNonQuery(dbCommand);
            }
        }
    }
}
